#!/usr/bin/env bash
set -e
[ -n "$NDENV_DEBUG" ] && set -x

# Provide ndenv completions
if [ "$1" = "--complete" ]; then
  exec ndenv-rehash --complete
fi

# When ndenv shell integration is enabled, delegate to ndenv-rehash,
# then tell the shell to empty its command lookup cache.
ndenv-rehash
echo "hash -r 2>/dev/null || true"
